package com.example.falvback.mapper;

import com.example.falvback.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 功能：
 * 作者：chen
 * 日期：2023/10/2410:17
 */
@Mapper
public interface LoginMapper {
    @Select("select * from user where username=#{username}")
    User selectByUsername(String username);
    @Insert("insert into user(username,password) values (#{username},#{password})")
    void insert(User user);

    @Select("select * from user where id=#{userId}")
    User selectById(String userId);
}
